﻿using Microsoft.Practices.Unity;
using RockBus.CacheManager.Interfaces;

namespace RockBus.Composition.AppFabric
{
    public class AppFabricSubscriptionRepDbMessageRepDependencyManager : DbSubscriptionPersistenceDbMessagePersistenceDependencyManager
    {
        protected override void FillContainer(IUnityContainer container)
        {
            base.FillContainer(container);

            // Overwrite CacheManager with AppFabric CacheManager
            container
            .RegisterType<ICacheManager, RockBus.CacheManager.AppFabric.CacheManager>(new ContainerControlledLifetimeManager())
            ;
        }
    }
}
